<?php
header("content-type:text/html;charset=utf8");
$username=$_GET['username'];
$pwd=$_GET['pwd'];
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$sql="select id from member where username='$username' and pwd='$pwd'";
$arr=$dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
if($arr)
{
    header("location:add.php");
}
else
{
    echo "登陆失败";
}
?>